<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.mstore.pojo.*"%>
<%
	request.setCharacterEncoding("UTF-8");
	String htmlData = request
			.getParameter("bAnnouncement.announcement") != null
			? request.getParameter("bAnnouncement.announcement")
			: "";

	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html>
	<head>
		<title>活动更新</title>
		<%@include file="/collect/meta.jsp"%>
		<link rel="stylesheet" href="${ctx }/css/radius.css" type="text/css"></link>
		<link rel="stylesheet" href="../themes/default/default.css" />
		<link rel="stylesheet" href="../plugins/code/prettify.css" />
		<script charset="utf-8" src="../kindeditor.js"></script>
		<script charset="utf-8" src="../lang/zh_CN.js"></script>
		<script charset="utf-8" src="../plugins/code/prettify.js"></script>
		<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
		<script>
	KindEditor.ready(function(K) {
		var editor1 = K.create('textarea[name="bAnnouncement.announcement"]', {
			cssPath : '../plugins/code/prettify.css',
			uploadJson : '../jsp/upload_json.jsp',
			fileManagerJson : '../jsp/file_manager_json.jsp',
			allowFileManager : true,
			afterCreate : function() {
				var self = this;
				K.ctrl(document, 13, function() {
					self.sync();
					document.forms['example'].submit();
				});
				K.ctrl(self.edit.doc, 13, function() {
					self.sync();
					document.forms['example'].submit();
				});
			}
		});
		prettyPrint();
	});
</script>
		<style type="text/css">
.input {
	width: 180px;
	height: 25px;
	font-size: 14px
}

.tbinput {
	width: 180px;
	height: 25px;
	font-size: 14px;
	background-color: #FFFFCC
}

.error {
	color: red
}

.success {
	color: green
}
</style>
		<%@include file="/collect/addlist.jsp"%>
	</head>
	<body lang="zh-cn">
		<%=htmlData%>
		<div class="wrapper">
			<c:import url="/collect/top.jsp"></c:import>
			<div class="main-container" id="main-container">
				<div class="main-container-inner">
					<c:import url="/collect/left.jsp"></c:import>
					<div class="main-content">
						<div class="breadcrumbs" id="breadcrumbs">
							<ul class="breadcrumb">
								<li>
									<i class="icon-home home-icon"></i>积分管理
								</li>
								<li>
									<a href="bAnnouncement!selectBAnnouncement">积分活动</a>
								</li>
								<li>
									修改
								</li>
							</ul>
							<!-- .breadcrumb -->
						</div>
						<div class="page-content">
							<div class="row">
								<div class="col-xs-12">
									<!-- PAGE CONTENT BEGINS -->
									<form name="example" method="post"
										action="bAnnouncement!updateBAnnouncement">
										<%
											BAnnouncement b = (BAnnouncement) session
													.getAttribute("bAnnouncement");
										%>
										<br />
										<div align="center">
											<label style="font-weight: bold;">
												活动标题
											</label>
											<input type="text" name="bAnnouncement.title"
												value="<%=b.getTitle()%>">
										</div>
										<input type="text" name="bAnnouncement.id"
											value="<%=b.getId()%>" style="display: none;">
										<input type="text" name="bAnnouncement.createTime"
											value="<%=b.getCreateTime()%>" style="display: none;">
										<input type="text" name="bAnnouncement.eaId"
											value="<%=b.getEaId()%>" style="display: none;">
										<br />
										<div align="center">
											<label style="font-weight: bold;">
												活动内容：
											</label>

											<textarea name="bAnnouncement.announcement" cols="100"
												rows="8"
												style="width: 700px; height: 200px; visibility: hidden;">
					            <%=b.getAnnouncement()%>
					                        </textarea>
										</div>
										<br />
										<div align="center">
											<input type="submit" name="button" value="保存"
												class="btn btn-primary radius" />
											<a class="btn btn-primary radius"
												href="bAnnouncement!selectBAnnouncement">返回</a>
										</div>
									</form>
									<!-- PAGE CONTENT ENDS -->
								</div>
								<!-- /.col -->
							</div>
							<!-- /.row -->
						</div>
						<!-- /.page-content -->
					</div>
					<!-- /.main-content -->
				</div>
				<!-- /.main-container-inner -->
				<a href="#" id="btn-scroll-up"
					class="btn-scroll-up btn btn-sm btn-inverse"
					style="position: fixed; bottom: 0;"> <i
					class="icon-double-angle-up icon-only bigger-110"></i> </a>
			</div>
			<!-- /.main-container -->
			<div class="push"></div>
		</div>
		<c:import url="/collect/down.jsp"></c:import>
	</body>
</html>
<%!private String htmlspecialchars(String str) {
		str = str.replaceAll("&", "&amp;");
		str = str.replaceAll("<", "&lt;");
		str = str.replaceAll(">", "&gt;");
		str = str.replaceAll("\"", "&quot;");
		return str;
	}%>